﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Core.BusinessLogic.Interfaces;
using System.ComponentModel.Composition;
using Core.DataAccess.IRepositories;
using Core.Common;
using Core.DataAccess;

namespace Core.BusinessLogic
{
    [Export(typeof(IStatusUpdateService))]
    public class StatusUpdateService : IStatusUpdateService
    {
        [Import]
        private IStatusUpdateRepository _statusUpdateRepository;

        public StatusUpdateService()
        {
            MEFManager.Compose(this);
        }

        public long SaveStatusUpdate(StatusUpdate statusUpdate)
        {
            return _statusUpdateRepository.SaveStatusUpdate(statusUpdate);
        }

        public List<StatusUpdate> GetStatusUpdateByAccountID(Int32 accountID)
        {
            return _statusUpdateRepository.GetStatusUpdateByAccountID(accountID);
        }

        public List<StatusUpdate> GetNewestStatusUpdateOfFriends(List<int> friendIDList)
        {
            return _statusUpdateRepository.GetNewestStatusUpdateOfFriends(friendIDList);
        }
    }
}
